# _*_ coding:utf-8 _*_
import xadmin
from .models import EmailVerifyRecord, UserMessage


class EmailVerifyRecordAdmin(object):
    list_display=['code', 'email', 'send_type', 'send_time']
    search_fields = ['code', 'email', 'send_type']
    list_filter = ['code', 'email', 'send_type', 'send_time']


# 用户消息后台管理器
class UserMessageAdmin(object):
    list_display = ['user', 'message', 'has_read', 'add_time']
    search_fields = ['user', 'message', 'has_read']
    list_filter = ['user', 'message', 'has_read', 'add_time']


xadmin.site.register(UserMessage, UserMessageAdmin)
xadmin.site.register(EmailVerifyRecord,EmailVerifyRecordAdmin)